import request from '@/request'

export interface IDeviceConfig {
  deviceId: string;
  position: string;
}

export interface IPageModule {
  path?: string;
  isLogin?: string;
  color: string;
  beforeColor: string;
  pathParam?: string;
  title: string;
  to?: string;
  icon?: string;
  disabled?: boolean;
  isShow?: string;
  query?:object
}

export interface IPic {
  card_sbk: string;
  card_sfz: string;
  card_dzybk: string;
  card_ynk: string;
  help_sbk: string;
  help_sfz: string;
  help_dzybk: string;
  help_ynk: string;
  help_lis: string;
}
export interface IConfig {
  deviceConfig: IDeviceConfig;
  deviceId: string;
  title: string;
  pic: IPic;
  page_module: IPageModule[];
  vedio: string;
  config:any;
  public?:any;
}


// 医卡通开户
export function getConfig(query?: object) {
  return request<IConfig>({
    url: '/ldzzj/ldzzj/api',
    method: 'post',
    data: {
      code: "env.config",
      ...query
    }
  })
}
(window as any).getConfig=getConfig;